import time
import threading #线程

def singing(name, age = 35, practice_time = 2.5):
    print(f"name:{name}, age:{age}, practice_time:{practice_time}")
    for i in range(5):
        print(f"{name} singing 鸡你太美...")
        time.sleep(0.5)
        
if __name__ == '__main__':
    #1.传元组， 只有一个元素时，要记得在后面加逗号
    # t1 = threading.Thread(target=singing, args=("蔡徐坤", ))
    #2.传字典, 不要求顺序
    # t1 = threading.Thread(target=singing, kwargs={"age": 18, "practice_time": 5, "name":"蔡徐坤"})
    #3.传元组加字典
    t1 = threading.Thread(target=singing, args = ("蔡徐坤", 32), kwargs={"practice_time": 7.5})
    t1.start()
